package com.gift.recommendation.modules.admin.service;

import com.gift.recommendation.modules.admin.dao.entity.FestivalEntity;
import com.gift.recommendation.modules.admin.dao.mapper.FestivalMapper;
import com.gift.recommendation.modules.admin.dto.FestivalListReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author zzh <2658137258@qq.com>
 * @date 2023/1/16
 */
@Component
public class FestivalService {

    @Autowired
    private FestivalMapper festivalMapper;

    public void insertSelective(FestivalEntity festival){
        festivalMapper.insertSelective(festival);
    }

    public void updateByPrimaryKeySelective(FestivalEntity festival){
        festivalMapper.updateByPrimaryKeySelective(festival);
    }

    public void deleteByPrimaryKey(Long id){
        festivalMapper.deleteByPrimaryKey(id);
    }

    public List<FestivalEntity> searchList(FestivalListReq req){
        return festivalMapper.searchFestivalList(req);
    }
    public FestivalEntity selectByPrimaryKey(Long id) {
        return festivalMapper.selectByPrimaryKey(id);
    }

    public List<FestivalEntity> selectByExample(Example example) {
        return festivalMapper.selectByExample(example);
    }
}
